package com.baizhi.controller;

import com.baizhi.entity.dept;
import com.baizhi.service.impl.DeptServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    private DeptServiceImpl dc;
    @GetMapping("depts")
    public List<dept> Categorys(){
        List<dept> depts = dc.selectCategory();
        return depts;
    }
}
